package com.weifly.jettycn.service;

import java.util.List;

import com.weifly.jettycn.domain.Catalog;
import com.weifly.jettycn.domain.Project;
import com.weifly.jettycn.domain.Release;
import com.weifly.jettycn.util.CallResult;
import com.weifly.jettycn.util.PageInfo;
import com.weifly.jettycn.util.QueryInfo;
import com.weifly.jettycn.util.TreeNode;

public interface IProjectService {

	/**
	 * 获得catalog缓存
	 */
	public List<TreeNode> getCatalogCache();

	/**
	 * 获得catalog层级列表
	 */
	public List<TreeNode> getCatalogLevel(String catalogid);
	
	/**
	 * 根据id查找catalog
	 */
	public Catalog getCatalog(String catalogid);
	
	/**
	 * 插入catalog
	 */
	public CallResult insertCatalog(Catalog catalog);
	
	/**
	 * 更新catalog
	 */
	public CallResult updateCatalog(Catalog catalog);
	
	/**
	 * 删除catalog
	 */
	public CallResult deleteCatalog(String catalogid);

	/**
	 * 刷新catalog缓存
	 */
	public void reloadCatalogCache();
	
	/**
	 * 查询project列表
	 */
	public PageInfo queryProjectList(QueryInfo queryInfo, List<String> catalogList);

	/**
	 * 插入project
	 */
	public CallResult insertProject(Project project);
	
	/**
	 * 更新project
	 */
	public CallResult updateProject(Project project);
	
	/**
	 * 根据id获得project
	 */
	public Project getProject(String projectid);
	
	/**
	 * 删除project
	 */
	public CallResult deleteProject(String projectid);
	
	/**
	 * 查询release列表
	 */
	public PageInfo queryReleaseList(String projectid, QueryInfo queryInfo);
	
	/**
	 * 插入release
	 */
	public CallResult insertRelease(Release release);
	
	/**
	 * 根据id获得release
	 */
	public Release getRelease(String releaseid);
	
	/**
	 * 更新release
	 */
	public CallResult updateRelease(Release release);
	
	/**
	 * 删除release
	 */
	public CallResult deleteRelease(String releaseid);
}
